1. Field of the Invention
The invention relates to a sampling rate technique of a Sony/Philips digital interface (SPDIF). More particularly, the invention relates to a technique for rapidly determining a sampling rate of an input signal according to weighted averages adjusted by filter ranges, so as to reduce a probability of erroneous judgment and save memory.
2. Description of Related Art
A Sony/Philips digital interface (SPDIF) is a digital audio transmission interface, which generally uses optical fibres and coaxial cables to transmit data to ensure correctness and synchronization of the data, so that an output result may have a high fidelity. Therefore, the SPDIF is widely used in DVD players and CD players supporting a digital theatre system (DTS) or Dolby digital.
Moreover, the SPDIF uses a bi-phase mark code (BMC) to mix a sampling frequency and its sampling information for transmission. Therefore, a transmitting end and a receiving end of the SPDIF only require one data line for transmitting and receiving data, and the receiving end of the SPDIF has to separate the sampling frequency from an input signal, so as to correctly sample the input signal. A standard SPDIF format can sample the input signals of four sampling rates, and the four sampling rates are respectively 32 KHz, 44.1 KHz, 48 KHz and 96 KHz, wherein the sampling rates of 44.1 KHz (generally used for CD digital audio sampling) and 48 KHz (generally used for DVD digital audio sampling) are relatively closed, so that the receiving end of the SPDIF may have a relatively high probability of erroneous judgment when determining these two sampling rates.
An example is provided below for description. In the input signal in accordance to the SPDIF, each sampling result is transmitted by 32-bit, which includes left and right channel information, while each bit is required to be sampled twice, so that bi-phase clock frequencies BCF44.1 Khz and BCF 48Khz of 44.1 KHz and 48 KHz are represented by following equations (1) and (2):BCF44.1 Khz=44.1 Khz×32×2×2=5.6448 Mhz  (1)BCF48 Khz=48 Khz×32×2×2=6.144 Mhz  (2)
During determination of the sampling rate, the input signal carrying the sampling rates of 44.1 KHz and 48 KHz can be determined according to the bi-phase clock frequencies BCF44.1 Khz and BCF 48Khz. However, when the input signal is influenced by factors such as clock jitter, quality difference of transmitting ends and sampling accuracy, etc., the bi-phase clock frequencies BCF are hard to be recognized due to closed values thereof, so that the receiving end of the SPDIF may have a relatively high probability of erroneous judgment when determining the two sampling rates. To reduce the probability of erroneous judgment, determination times of the sampling rate have to be increased, so as to correctly determine the sampling rate according to an average of multiple sampling results, though a memory volume is accordingly increased, and the time required for determination is also increased.